PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Command Handlers for Application Objects

You can use a command handler in a script to handle a command that is sent to an application object. Associating a script that contains a command handler with an application object that receives a command is called attaching a script to an application object. An application that supports this capability is called an attachable application. Such an application might allow you to attach a script to a button or menu object, for example, to handle commands sent to those objects.

Scripts that are attached to objects can change the way those objects respond to particular commands. Each application determines which of its objects, if any, can have attached scripts and how you attach the scripts. To determine whether you can attach a script to an application's objects, see the documentation for the application.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)